package cn.ssm.biz;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.ssm.pojo.Pager;
import cn.ssm.pojo.Repairlist;
import cn.ssm.query.RepairCountQuery;
import cn.ssm.query.RepairlistQuery;

public interface RepairlistBiz {

	// public List<Repairlist> addRepairlist(int id);

	// public int findComputerinfo( int computerroomId,int faultId);

	public int addrepairlist(Repairlist r);

	// 查询
	public List<Repairlist> findRepairlist(/* int id */);

	// 根据id插寻
	public Repairlist findRepairlistId(int id);

	// 根据id修改
	public int updateLId(Repairlist repairlist);

	// 根据id删除
	public int delId(int id);

	public List<RepairlistQuery> findRepairlistQuery(Pager pager, int computerroonId);

	public int findRepairlistCount();

	public int selRepairlistComputerroomIdCount(Integer computerroomId);

	public List<RepairCountQuery> getCountByFaultIdAndClassId(@Param("faultId") Integer faultId,
			@Param("statusId") Integer statusId, @Param("beginFaultTime") String beginFaultTime,
			@Param("endFaultTime") String endFaultTime, String classroomId);

	public List<RepairCountQuery> selectCountByFaultId(@Param("computerroomId") Integer computerroomId,
			@Param("faultId") Integer faultId, @Param("statusId") Integer statusId,
			@Param("beginFaultTime") String beginFaultTime, @Param("endFaultTime") String endFaultTime,
			Integer classroomId);

	public List<RepairlistQuery> selectOneComputerStatusByCId(int computerId, int computerroomId);

	public List<RepairlistQuery> findRepairlistQueryFaultName(Pager pager, @Param("computerId") int computerId,
			@Param("computerroomId") int computerroomId);

	public int selRepairlistQueryFaultNameCount(@Param("computerId") int computerId,
			@Param("computerroomId") int computerroomId);

	public List<RepairlistQuery> selectroomStatusByroomId(@Param("computerroomId") int computerroomId);

	// 获取机房所有的电脑信息
	public List<Repairlist> findRepairlistAllByComputerroomId(Integer computerroomId);

	public Integer selRepairlistIsOne(Integer faultId, Integer computerroomId, Integer computerId);

	
	
	public List<RepairCountQuery> selectCountByFaultId4(@Param("computerroomId") Integer computerroomId,
			@Param("faultId") Integer faultId, @Param("statusId") Integer statuId,
			@Param("beginFaultTime") String beginFaultTime, @Param("endFaultTime") String endFaultTime,
			@Param("classroomId") Integer classroomId);
}
